/**
 *
 */
export function returnDateTime(dateType: String) {
  let time = new Date();
  console.log(time);

  let y = time.getFullYear(); //年
  let m = (time.getMonth() + 1).toString().padStart(2, '0'); //月
  let d = time.getDate().toString().padStart(2, '0'); //日
  let h = time.getHours().toString().padStart(2, '0'); //时
  let mm = time.getMinutes().toString().padStart(2, '0'); //分
  let s = time.getSeconds().toString().padStart(2, '0'); //秒
  if (dateType === 'YYYY-MM-DD') {
    return y+'-'+m+'-'+d
  }
  if (dateType === 'HH:mm:ss') {
    return h+':'+mm+':'+s
  }
  if (dateType === '年月日') {
    return y+'年'+m+'月'+d+'日'
  }
  if (dateType === '年') {
    return y
  }
  if (dateType === '月') {
    return m
  }
  if (dateType === '日') {
    return d
  }
  if (dateType === 'stamp') {
    return 'DK'+ time.getTime()
  }
  return y+'-'+m+'-'+d+' '+h+':'+mm+':'+s;
}
